#
# Copyright © 2021 深圳百问网科技有限公司 All Rights Reserved.
# 视频在线学习：https://www.100ask.net
# 硬件购买地址：https://shop502068889.taobao.com
#
# SPDX-License-Identifier: BSD-3-Clause
#

"""
接线
    VCC  ---  5v
    OUT  ---  0
    GND  --- GND
"""

import time
from machine import Pin

hc_sr501=Pin(0, Pin.IN)

while True:
    if hc_sr501.value() == 1:
        print("100ASK: Human activity detected!")
    else:
        print("100ASK: There is no human activity")
    time.sleep(0.1)
